/**
 * Copyright (c) Freelens Authors. All rights reserved.
 * Copyright (c) OpenLens Authors. All rights reserved.
 * Licensed under MIT License. See LICENSE in root directory for more information.
 */

@use "autoscaler.mixins";
@use "../table/table.mixins";
@use "../vars" as *;

.VerticalPodAutoscalers {
  .TableCell {
    &.name {
      flex: 1.5;
    }

    &.warning {
      @include table.table-cell-warning;
    }

    &.metrics {
      flex: 1.5;
    }

    &.conditions {
      flex: 1.5;

      .condition {
        display: inline-block;
        margin-right: $margin;

        &.RecommendationProvided {
          color: map-get(autoscaler.$vpa-status-colors, RecommendationProvided);
        }
        &.LowConfidence {
          color: map-get(autoscaler.$vpa-status-colors, LowConfidence);
        }
        &.FetchingHistory {
          color: map-get(autoscaler.$vpa-status-colors, FetchingHistory);
        }
        &.NoPodsMatched {
          color: map-get(autoscaler.$vpa-status-colors, NoPodsMatched);
        }
        &.RecommendationMissing {
          color: map-get(autoscaler.$vpa-status-colors, RecommendationMissing);
        }
        &.ConfigUnsupported {
          color: map-get(autoscaler.$vpa-status-colors, ConfigUnsupported);
        }
        &.UpdateModeUnsupported {
          color: map-get(autoscaler.$vpa-status-colors, UpdateModeUnsupported);
        }
        &.UpdateInProgress {
          color: map-get(autoscaler.$vpa-status-colors, UpdateInProgress);
        }
      }
    }

    &.age {
      flex: 0.5;
    }
  }
}
